<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /* 
            String 扩展方法 
                startWith     区分大小写
                endWith

                repeat 重复字符
         */

        var str = "hello world!";
        var str1 = "http://www.jsdf.com/ddsfsdf.pdf"
        console.log(str.startsWith("hel"));
        console.log(str1.endsWith(".pdf"));

        var str2 = "a";
        console.log("a".repeat(5));
    </script>
</body>

</html>